
import Message from './Message.vue'
let MessageObj = {};

MessageObj.install = function(Vue){
    console.log(123)
    console.log(Vue)
    //创建一个子类
    let MyMessage = Vue.extend(Message)
    console.log(new MyMessage())

    //组件实例
    let $vm = new MyMessage()
    console.log($vm)
    //找到dom结构
    let vNode = $vm.$mount().$el
    console.log(vNode)
    //添加到页面上
    document.body.appendChild(vNode)

  
    Vue.prototype.$message = (msg) => {
          $vm.flag = true
          $vm.content = msg
        console.log('点了')
    }
}

export default MessageObj;